summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-11-12 20:58:30 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-11-12 20:58:30 +0100
commit50bcfa5fb9e796c4ac6159be54e1363c0cee200a (patch)
tree39b252c175baab5c8950644619e8171b08582ec5
parentrenderer_vulkan: Introduce separate cmd buffer for uploads (diff)
downloadyuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.tar
yuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.tar.gz
yuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.tar.bz2
yuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.tar.lz
yuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.tar.xz
yuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.tar.zst
yuzu-50bcfa5fb9e796c4ac6159be54e1363c0cee200a.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_scheduler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp
index f1a9406ce..146923db4 100644
--- a/src/video_core/renderer_vulkan/vk_scheduler.cpp
+++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp
@@ -222,6 +222,14 @@ u64 Scheduler::SubmitExecution(VkSemaphore signal_semaphore, VkSemaphore wait_se
const u64 signal_value = master_semaphore->NextTick();
RecordWithUploadBuffer([signal_semaphore, wait_semaphore, signal_value,
this](vk::CommandBuffer cmdbuf, vk::CommandBuffer upload_cmdbuf) {
+ static constexpr VkMemoryBarrier WRITE_BARRIER{
+ .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER,
+ .pNext = nullptr,
+ .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT,
+ .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT,
+ };
+ upload_cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, WRITE_BARRIER);
upload_cmdbuf.End();
cmdbuf.End();